package com.lagou.module2.task3.play.impl;

import com.lagou.module2.task3.card.SIMCard;
import com.lagou.module2.task3.play.NetworkService;
import com.lagou.module2.task3.play.Package;

public class NetworkServiceImpl extends Package implements NetworkService {

    private int mobileInternetData;
    private int monthlyCharges;

    public NetworkServiceImpl(){}

    @Override
    public void show() {
        System.out.println("上网套餐信息如下");
        System.out.println("剩余上网流量：" + getMobileInternetData() + ", 每月资费" + getMonthlyCharges());
    }

    public NetworkServiceImpl(int mobileInternetData, int monthlyCharges){
        setMobileInternetData(mobileInternetData);
        setMonthlyCharges(monthlyCharges);
    }

    public int getMobileInternetData() {
        return mobileInternetData;
    }

    public void setMobileInternetData(int mobileInternetData) {
        this.mobileInternetData = mobileInternetData;
    }

    public int getMonthlyCharges() {
        return monthlyCharges;
    }

    public void setMonthlyCharges(int monthlyCharges) {
        this.monthlyCharges = monthlyCharges;
    }

    @Override
    public void connect(int mobileInternetData, SIMCard simCard) {
        System.out.println("用户小张使用了上网服务，已经使用流量" + mobileInternetData + "MB");
    }
}
